package first.endtoend

import first.endtoend.Category
import first.endtoend.RationCard
import first.endtoend.Tag
import first.endtoend.Trace

class CategoryService
{

    def tagService

    def serviceMethod()
    {

    }

    def toJson(Category aCategory)
    {
        def listResult = new ArrayList<Trace>()
        RationCard rationCard
        Tag tag
        // int count= 0
        if (aCategory)
        {

            if (aCategory.families)
            {
                listResult = new ArrayList<Tag>()
                aCategory.families.each {
                    listResult.add(tagService.toJson(it))

                }
                [
                        id  : aCategory.id,
                        name: aCategory.name

                ]

            }


        }
    }
}
